package com.atguigu.tingshu.account.service;

import com.atguigu.tingshu.model.account.UserAccount;
import com.atguigu.tingshu.vo.account.AccountLockResultVo;
import com.atguigu.tingshu.vo.account.AccountLockVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

public interface UserAccountService extends IService<UserAccount> {

    /**
     * 添加账户信息
     *
     * @param userId
     */
    void initUserAccount(Long userId);

    /**
     * 获取用户可用余额
     *
     * @return
     */
    BigDecimal getAvailableAmount();

    /**
     * 校验余额并锁定余额
     *
     * @param accountLockVo
     * @return
     */
    AccountLockResultVo checkAndLockAccount(AccountLockVo accountLockVo);
}
